device = 'Dev1';

chList = {'ai1', 'ai2', 'ai3', 'ai4', 'ai5'};

BxCoeff = [1.0,   9.0,      0,      0,      0].';
ByCoeff = [0.0,   0.0,      1.0,    0,      0].';
BzCoeff = [0.0,   0.0,      0,      1.0,    9].';

f = @(data) data*[BxCoeff, ByCoeff, BzCoeff];

StateMonitor(device, 'func', f, 'channel', chList, 'label', {'Bx', 'By', 'Bz'}, 'unit', 'nT')